package com.xs.tool.service.impl;

import com.xs.tool.dao.ToolTestDao;
import com.xs.tool.model.ToolTest;
import com.xs.tool.service.ToolTestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;


/**
 * 服务层
 */
@Component("toolTestService")
@Transactional
public class ToolTestServiceImpl implements ToolTestService {
  @Autowired
  ToolTestDao toolTestDao;

  @Override
  public ToolTest save(ToolTest toolTest) {
    return toolTestDao.save(toolTest);
  }

  @Override
  public Page<ToolTest> findByLastNameWithPageable(String lastName, Pageable pageable) {
    return toolTestDao.findByLastNameWithPageable(lastName,pageable);
  }
}
